home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / Interapplication Communication / IPCLister / IPCLister.r < prev    next >
Encoding:
Text File  |  1993-01-18  |  8.3 KB  |  379 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2. resource 'MENU' (131) {
  3.     131,
  4.     textMenuProc,
  5.     0x7FFFFFD7,
  6.     enabled,
  7.     "Test Stuff",
  8.     {    /* array: 1 elements */
  9.         /* [1] */
  10.         "Refresh Mac List", noIcon, noKey, noMark, plain
  11.     }
  12. };
  13.  
  14. resource 'MENU' (128, preload) {
  15.     128,
  16.     textMenuProc,
  17.     0x7FFFFFFD,
  18.     enabled,
  19.     apple,
  20.     {    /* array: 2 elements */
  21.         /* [1] */
  22.         "About", noIcon, noKey, noMark, plain,
  23.         /* [2] */
  24.         "-", noIcon, noKey, noMark, plain
  25.     }
  26. };
  27.  
  28. resource 'MENU' (129, preload) {
  29.     129,
  30.     textMenuProc,
  31.     0xE00,
  32.     enabled,
  33.     "File",
  34.     {    /* array: 10 elements */
  35.         /* [1] */
  36.         "New", noIcon, "N", noMark, plain,
  37.         /* [2] */
  38.         "Open", noIcon, "O", noMark, plain,
  39.         /* [3] */
  40.         "Close", noIcon, "W", noMark, plain,
  41.         /* [4] */
  42.         "Save", noIcon, "S", noMark, plain,
  43.         /* [5] */
  44.         "Save As...", noIcon, noKey, noMark, plain,
  45.         /* [6] */
  46.         "-", noIcon, noKey, noMark, plain,
  47.         /* [7] */
  48.         "Page Setup...", noIcon, noKey, noMark, plain,
  49.         /* [8] */
  50.         "Print...", noIcon, "P", noMark, plain,
  51.         /* [9] */
  52.         "-", noIcon, noKey, noMark, plain,
  53.         /* [10] */
  54.         "Quit", noIcon, "Q", noMark, plain
  55.     }
  56. };
  57.  
  58. resource 'MENU' (130, preload) {
  59.     130,
  60.     textMenuProc,
  61.     0x3400,
  62.     enabled,
  63.     "Edit",
  64.     {    /* array: 6 elements */
  65.         /* [1] */
  66.         "Undo", noIcon, "Z", noMark, plain,
  67.         /* [2] */
  68.         "-", noIcon, noKey, noMark, plain,
  69.         /* [3] */
  70.         "Cut", noIcon, "X", noMark, plain,
  71.         /* [4] */
  72.         "Copy", noIcon, "C", noMark, plain,
  73.         /* [5] */
  74.         "Paste", noIcon, "V", noMark, plain,
  75.         /* [6] */
  76.         "Clear", noIcon, noKey, noMark, plain
  77.     }
  78. };
  79.  
  80. resource 'DITL' (128, purgeable) {
  81.     {    /* array DITLarray: 5 elements */
  82.         /* [1] */
  83.         {164, 115, 184, 185},
  84.         Button {
  85.             enabled,
  86.             "OK"
  87.         },
  88.         /* [2] */
  89.         {11, 76, 34, 246},
  90.         StaticText {
  91.             disabled,
  92.             "IPCListPorts example"
  93.         },
  94.         /* [3] */
  95.         {76, 3, 154, 301},
  96.         StaticText {
  97.             disabled,
  98.             "FredWare from Apple Developer Technical "
  99.             "Support, ADS group.\nCopyright ©  1991 Ap"
  100.             "ple Computer Inc.\nWritten by C.K. Haun <"
  101.             "TR>\nPPC Code by Jim Luther JML"
  102.         },
  103.         /* [4] */
  104.         {53, 82, 71, 227},
  105.         StaticText {
  106.             disabled,
  107.             "version 1.0"
  108.         },
  109.         /* [5] */
  110.         {-1, 1, 68, 69},
  111.         Icon {
  112.             disabled,
  113.             129
  114.         }
  115.     }
  116. };
  117.  
  118. resource 'DITL' (129, purgeable) {
  119.     {    /* array DITLarray: 2 elements */
  120.         /* [1] */
  121.         {170, 90, 190, 148},
  122.         Button {
  123.             enabled,
  124.             "OK"
  125.         },
  126.         /* [2] */
  127.         {10, 40, 62, 204},
  128.         StaticText {
  129.             disabled,
  130.             "Help information should go here"
  131.         }
  132.     }
  133. };
  134.  
  135. resource 'DITL' (130, purgeable) {
  136.     {    /* array DITLarray: 3 elements */
  137.         /* [1] */
  138.         {80, 100, 100, 158},
  139.         Button {
  140.             enabled,
  141.             "Exit"
  142.         },
  143.         /* [2] */
  144.         {10, 80, 27, 237},
  145.         StaticText {
  146.             disabled,
  147.             "Bad System Version!"
  148.         },
  149.         /* [3] */
  150.         {50, 25, 66, 232},
  151.         StaticText {
  152.             disabled,
  153.             "Requires System 7 or greater."
  154.         }
  155.     }
  156. };
  157.  
  158. resource 'DITL' (131) {
  159.     {    /* array DITLarray: 2 elements */
  160.         /* [1] */
  161.         {18, 25, 50, 57},
  162.         Icon {
  163.             disabled,
  164.             128
  165.         },
  166.         /* [2] */
  167.         {15, 70, 56, 325},
  168.         StaticText {
  169.             disabled,
  170.             "Getting a list of all the machines in th"
  171.             "is zone, hang on......"
  172.         }
  173.     }
  174. };
  175.  
  176. resource 'ALRT' (128, purgeable) {
  177.     {40, 40, 229, 363},
  178.     128,
  179.     {    /* array: 4 elements */
  180.         /* [1] */
  181.         OK, visible, silent,
  182.         /* [2] */
  183.         OK, visible, silent,
  184.         /* [3] */
  185.         OK, visible, silent,
  186.         /* [4] */
  187.         OK, visible, silent
  188.     }
  189. };
  190.  
  191. resource 'ALRT' (130, purgeable) {
  192.     {40, 40, 149, 296},
  193.     130,
  194.     {    /* array: 4 elements */
  195.         /* [1] */
  196.         OK, visible, sound1,
  197.         /* [2] */
  198.         OK, visible, sound1,
  199.         /* [3] */
  200.         OK, visible, sound1,
  201.         /* [4] */
  202.         OK, visible, sound1
  203.     }
  204. };
  205.  
  206. resource 'WIND' (128, purgeable) {
  207.     {44, 4, 242, 498},
  208.     documentProc,
  209.     visible,
  210.     noGoAway,
  211.     0x0,
  212.     "Simple"
  213. };
  214.  
  215. resource 'WIND' (129) {
  216.     {40, 40, 170, 286},
  217.     movableDBoxProc,
  218.     invisible,
  219.     noGoAway,
  220.     0x0,
  221.     "Sample Moveable Modal"
  222. };
  223.  
  224. data 'TEXT' (128) {
  225.     $"5468 6973 2073 616D 706C 6520 7368 6F77"            /* This sample show */
  226.     $"2061 2076 6572 7920 7369 6D70 6C65 2069"            /*  a very simple i */
  227.     $"6D70 6C65 6D65 6E74 6174 696F 6E20 6F66"            /* mplementation of */
  228.     $"2074 6865 2037 2E30 204D 6F76 6561 626C"            /*  the 7.0 Moveabl */
  229.     $"6520 4D6F 6461 6C20 4469 616C 6F67 2E0D"            /* e Modal Dialog.¬ */
  230.     $"5369 6E63 6520 796F 7520 6361 6E27 7420"            /* Since you can't  */
  231.     $"6361 6C6C 204D 6F64 616C 4469 616C 6F67"            /* call ModalDialog */
  232.     $"206F 6E20 6120 4D4D 6F64 616C 2C20 796F"            /*  on a MModal, yo */
  233.     $"7520 6861 7665 2074 6F20 646F 2074 6865"            /* u have to do the */
  234.     $"2061 6374 7561 6C20 6869 7420 7265 7374"            /*  actual hit rest */
  235.     $"7269 6374 696E 6720 616E 6420 6D65 6E75"            /* ricting and menu */
  236.     $"2064 696D 6D69 6E67 2079 6F75 7273 656C"            /*  dimming yoursel */
  237.     $"662C 2062 7574 2069 7427 7320 6E6F 7420"            /* f, but it's not  */
  238.     $"7265 616C 6C79 206D 7563 6820 6D6F 7265"            /* really much more */
  239.     $"206F 6620 6120 6368 6F72 652E 2020 416C"            /*  of a chore.  Al */
  240.     $"6C20 796F 7520 6E65 6564 2074 6F20 6164"            /* l you need to ad */
  241.     $"6420 6973 206F 6E65 206C 696C 2720 676C"            /* d is one lil' gl */
  242.     $"6F62 616C 2074 6861 7420 7465 6C6C 7320"            /* obal that tells  */
  243.     $"796F 7520 7768 656E 2079 6F75 2776 6520"            /* you when you've  */
  244.     $"676F 7420 6120 4D4D 6F64 616C 2075 702C"            /* got a MModal up, */
  245.     $"2061 6E64 2074 6869 6E67 7320 7769 6C6C"            /*  and things will */
  246.     $"2062 6520 776F 6E64 6572 6675 6C2E 0D0D"            /*  be wonderful.¬¬ */
  247.     $"5365 6C65 6374 2027 4F70 656E 204D 6F76"            /* Select 'Open Mov */
  248.     $"6561 626C 6520 4D6F 6461 6C27 2066 726F"            /* eable Modal' fro */
  249.     $"6D20 7468 6520 5465 7374 2053 7475 6666"            /* m the Test Stuff */
  250.     $"206D 656E 7520 746F 2077 6174 6368 2069"            /*  menu to watch i */
  251.     $"7420 776F 726B 2E"                                  /* t work. */
  252. };
  253.  
  254. data 'TEXT' (129) {
  255.     $"5468 6973 2069 7320 6120 6D6F 7665 6162"            /* This is a moveab */
  256.     $"6C65 206D 6F64 616C 2064 6961 6C6F 672E"            /* le modal dialog. */
  257.     $"2020 436C 6963 6B20 696E 2074 6861 7420"            /*   Click in that  */
  258.     $"6275 7474 6F6E 2074 6865 7265 2074 6F20"            /* button there to  */
  259.     $"6D61 6B65 2069 7420 676F 2061 7761 792E"            /* make it go away. */
  260. };
  261.  
  262. data 'TEXT' (130) {
  263.     $"4772 6174 7569 746F 7573 2053 6563 6F6E"            /* Gratuitous Secon */
  264.     $"6420 5769 6E64 6F77 2E20 2049 676E 6F72"            /* d Window.  Ignor */
  265.     $"6520 6D65 2C20 706C 6561 7365 2E"                   /* e me, please. */
  266. };
  267.  
  268. resource 'STR#' (128) {
  269.     {    /* array StringArray: 3 elements */
  270.         /* [1] */
  271.         "Another Window Fer Fun",
  272.         /* [2] */
  273.         "PPC Capable Macs",
  274.         /* [3] */
  275.         "PPC Ports on Selected mac"
  276.     }
  277. };
  278.  
  279. resource 'STR#' (129) {
  280.     {    /* array StringArray: 2 elements */
  281.         /* [1] */
  282.         "Close Moveable Modal Dialog",
  283.         /* [2] */
  284.         "Open Moveable Modal Dialog"
  285.     }
  286. };
  287.  
  288. resource 'DLOG' (129, "Sample Help Dialog", purgeable) {
  289.     {34, 40, 234, 280},
  290.     dBoxProc,
  291.     visible,
  292.     goAway,
  293.     0x0,
  294.     129,
  295.     ""
  296. };
  297.  
  298. resource 'DLOG' (131, "please wait", purgeable) {
  299.     {40, 40, 126, 395},
  300.     dBoxProc,
  301.     visible,
  302.     goAway,
  303.     0x0,
  304.     131,
  305.     ""
  306. };
  307.  
  308. resource 'MBAR' (128) {
  309.     {    /* array MenuArray: 4 elements */
  310.         /* [1] */
  311.         128,
  312.         /* [2] */
  313.         129,
  314.         /* [3] */
  315.         130,
  316.         /* [4] */
  317.         131
  318.     }
  319. };
  320.  
  321. resource 'SIZE' (-1) {
  322.     reserved,
  323.     acceptSuspendResumeEvents,
  324.     reserved,
  325.     canBackground,
  326.     multiFinderAware,
  327.     backgroundAndForeground,
  328.     dontGetFrontClicks,
  329.     ignoreChildDiedEvents,
  330.     is32BitCompatible,
  331.     isHighLevelEventAware,
  332.     localAndRemoteHLEvents,
  333.     notStationeryAware,
  334.     dontUseTextEditServices,
  335.     reserved,
  336.     reserved,
  337.     reserved,
  338.     250000,
  339.     250000
  340. };
  341.  
  342. resource 'STR ' (128) {
  343.     "Simple Help..."
  344. };
  345.  
  346. resource 'CNTL' (128) {
  347.     {99, 55, 128, 185},
  348.     0,
  349.     visible,
  350.     0,
  351.     0,
  352.     pushButProc,
  353.     0,
  354.     "Close Me"
  355. };
  356.  
  357. resource 'ICON' (128) {
  358.     $"001F F800 00E0 0700 0300 00C0 0C00 0030"
  359.     $"1800 0018 2000 0004 6FE0 0006 404F E002"
  360.     $"8080 4001 8100 87F1 8201 0021 8402 0041"
  361.     $"8FE4 0081 800F E101 4000 0202 6000 07F6"
  362.     $"2000 0004 1800 0018 0C00 0030 0300 00C0"
  363.     $"00E0 0700 001F F800 01E0 0000 0210 0000"
  364.     $"0210 0000 0210 0000 01EF 0000 0009 0000"
  365.     $"000F 3C00 0000 2400 0000 3CE0 0000 00E0"
  366. };
  367.  
  368. resource 'ICON' (129) {
  369.     $"0007 F000 001C 1C00 0030 0600 0040 0900"
  370.     $"0EAC CC80 09A9 B7C0 0D6D 3570 1F00 0170"
  371.     $"1200 0030 127C 3E2C 3C0C B01F 2405 2018"
  372.     $"6401 0018 7402 0036 140E 0032 3C18 0032"
  373.     $"2C1F C011 2C00 0019 2455 541F 4655 543C"
  374.     $"4640 0434 2B5F FC76 1940 0456 19D5 54D4"
  375.     $"18D5 55B2 1C55 5512 3875 5612 785D 5C11"
  376.     $"D857 F40D A854 5405 B850 1404 F040 0404"
  377. };
  378.  
  379.